package com.ymk.service.impl;

import com.ymk.base.mybatis.DaoRouter;
import com.ymk.base.mybatis.Pagination;
import com.ymk.bo.work.DyMesBO;
import com.ymk.service.IDyMesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 莫参商
 * @since 2024-01-19
 */
@Service
public class DyMesService implements IDyMesService {

    @Override
    public DyMesBO get(Map param) {
    return this.daoRouter.queryForObject("DyMes.loadDyMes",param);
    }

    @Override
    public List<DyMesBO> list(Map param) {
        return this.daoRouter.query("DyMes.loadDyMes",param);
    }

    @Override
    public List<DyMesBO> listForPage(Pagination pagination) {
        return this.daoRouter.query("DyMes.loadDyMesForPage",pagination);
    }

    @Override
    public void post(DyMesBO param) {
        this.daoRouter.insert("ADyMes.insertDyMes",param);
    }

    @Override
    public void update(DyMesBO param) {
        this.daoRouter.update("ADyMes.updateDyMes",param);
    }

    @Override
    public void del(DyMesBO param) {
        this.daoRouter.update("ADyMes.delDyMes",param);
    }

    @Autowired
    private DaoRouter daoRouter;

}
